package agentes;

  class Jeops_RuleBase_DiagramaSequenciaRegras extends jeops.AbstractRuleBase {

	
    /**
     * Identifiers of rule respostaValida
     */
    private String[] identifiers_respostaValida = {
        "parte1",
        "respostas",
        "dicas"
    };

    /**
     * Returns the identifiers declared in rule respostaValida
     *
     * @return the identifiers declared in rule respostaValida
     */
    private String[] getDeclaredIdentifiers_respostaValida() {
         return identifiers_respostaValida;
    }

    /**
     * Returns the name of the class of one declared object for
     * rule respostaValida.
     *
     * @param index the index of the declaration
     * @return the name of the class of the declared objects for
     *          this rule.
     */
    private String getDeclaredClassName_respostaValida(int index) {
        switch (index) {
            case 0: return "agentes.DiagramaSequencia";
            case 1: return "agentes.DiagramaSequenciaRespostas";
            case 2: return "agentes.DiagramaSequenciaDicas";
            default: return null;
        }
    }

    /**
     * Returns the class of one declared object for rule respostaValida.
     *
     * @param index the index of the declaration
     * @return the class of the declared objects for this rule.
     */
    private Class getDeclaredClass_respostaValida(int index) {
        switch (index) {
            case 0: return agentes.DiagramaSequencia.class;
            case 1: return agentes.DiagramaSequenciaRespostas.class;
            case 2: return agentes.DiagramaSequenciaDicas.class;
            default: return null;
        }
    }

    /**
     * Sets an object declared in the rule respostaValida.
     *
     * @param index the index of the declared object
     * @param value the value of the object being set.
     */
    private void setObject_respostaValida(int index, Object value) {
        switch (index) {
            case 0: this.agentes_DiagramaSequencia_1 = (agentes.DiagramaSequencia) value; break;
            case 1: this.agentes_DiagramaSequenciaRespostas_1 = (agentes.DiagramaSequenciaRespostas) value; break;
            case 2: this.agentes_DiagramaSequenciaDicas_1 = (agentes.DiagramaSequenciaDicas) value; break;
        }
    }

    /**
     * Returns an object declared in the rule respostaValida.
     *
     * @param index the index of the declared object
     * @return the value of the corresponding object.
     */
    private Object getObject_respostaValida(int index) {
        switch (index) {
            case 0: return agentes_DiagramaSequencia_1;
            case 1: return agentes_DiagramaSequenciaRespostas_1;
            case 2: return agentes_DiagramaSequenciaDicas_1;
            default: return null;
        }
    }

    /**
     * Returns all variables bound to the declarations 
     * of rule respostaValida
     *
     * @return an object array of the variables bound to the
     *          declarations of this rule.
     */
    private Object[] getObjects_respostaValida() {
        return new Object[] {
                            agentes_DiagramaSequencia_1,
                            agentes_DiagramaSequenciaRespostas_1,
                            agentes_DiagramaSequenciaDicas_1
                            };
    }

    /**
     * Defines all variables bound to the declarations 
     * of rule respostaValida
     *
     * @param objects an object array of the variables bound to the
     *          declarations of this rule.
     */
    private void setObjects_respostaValida(Object[] objects) {
        agentes_DiagramaSequencia_1 = (agentes.DiagramaSequencia) objects[0];
        agentes_DiagramaSequenciaRespostas_1 = (agentes.DiagramaSequenciaRespostas) objects[1];
        agentes_DiagramaSequenciaDicas_1 = (agentes.DiagramaSequenciaDicas) objects[2];
    }

    /**
     * Condition 0 of rule respostaValida.<p>
     * The original expression was:<br>
     * <code>parte1.verificarPreenchimento()</code>
     *
     * @return <code>true</code> if the condition is satisfied;
     *          <code>false</code> otherwise.
     */
    private boolean respostaValida_cond_0() {
        return (agentes_DiagramaSequencia_1.verificarPreenchimento());
    }

    /**
     * Condition 1 of rule respostaValida.<p>
     * The original expression was:<br>
     * <code>respostas.elementoRepetido(parte1.getOpcao1(), parte1.getOpcao2()) == -1</code>
     *
     * @return <code>true</code> if the condition is satisfied;
     *          <code>false</code> otherwise.
     */
    private boolean respostaValida_cond_1() {
        return (agentes_DiagramaSequenciaRespostas_1.elementoRepetido(agentes_DiagramaSequencia_1.getOpcao1(), agentes_DiagramaSequencia_1.getOpcao2()) == -1);
    }

    /**
     * Condition 2 of rule respostaValida.<p>
     * The original expression was:<br>
     * <code>respostas.todosPreenchidos()</code>
     *
     * @return <code>true</code> if the condition is satisfied;
     *          <code>false</code> otherwise.
     */
    private boolean respostaValida_cond_2() {
        return (agentes_DiagramaSequenciaRespostas_1.todosPreenchidos());
    }

    /**
     * Checks whether some conditions of rule respostaValida is satisfied.
     *
     * @param index the index of the condition to be checked.
     * @return <code>true</code> if the condition is satisfied;
     *          <code>false</code> otherwise.
     */
    private boolean respostaValida_cond(int index) {
        switch (index) {
            case 0: return respostaValida_cond_0();
            case 1: return respostaValida_cond_1();
            case 2: return respostaValida_cond_2();
            default: return false;
        }
    }

    /**
     * Checks whether all conditions of rule respostaValida that depend only on
     * the given object are satisfied.
     *
     * @param declIndex the index of the declaration to be checked
     * @return <code>true</code> if all corresponding conditions for
     *          this rule are satisfied; <code>false</code> otherwise.
     */
    private boolean checkConditionsOnlyOf_respostaValida(int declIndex) {
        switch (declIndex) {
            case 0:
                if (!respostaValida_cond_0()) return false;
                return true;
            case 1:
                if (!respostaValida_cond_2()) return false;
                return true;
            case 2:
                return true;
            default: return false;
        }
    }

    /**
     * Checks whether all the conditions of a rule which
     * reference some declared element of the declarations are
     * true.
     *
     * @param declIndex the index of the declared element.
     * @return <code>true</code> if the conditions that reference
     *          up to the given declaration are true;
     *          <code>false</code> otherwise.
     */
    private boolean checkCondForDeclaration_respostaValida(int declIndex) {
        switch (declIndex) {
            case 0:
                return true;
            case 1:
                if (!respostaValida_cond_1()) return false;
                return true;
            case 2:
                return true;
            default: return false;
        }
    }

    /**
     * Executes the action part of the rule respostaValida
     */
    private void respostaValida() {
			agentes_DiagramaSequenciaRespostas_1.setRespostas(agentes_DiagramaSequencia_1.getOpcao1(), agentes_DiagramaSequencia_1.getOpcao2());
			agentes_DiagramaSequencia_1.preencherRespostas();
			agentes_DiagramaSequencia_1.mostrarIconeSucesso();
			agentes_DiagramaSequenciaDicas_1.setHaErro(false);
			agentes_DiagramaSequenciaDicas_1.mostrarAlerta(4);
			modified(agentes_DiagramaSequenciaRespostas_1);
			retract(agentes_DiagramaSequencia_1);
	
	    }


	
	
    /**
     * Identifiers of rule respostaValida_1
     */
    private String[] identifiers_respostaValida_1 = {
        "parte1",
        "respostas"
    };

    /**
     * Returns the identifiers declared in rule respostaValida_1
     *
     * @return the identifiers declared in rule respostaValida_1
     */
    private String[] getDeclaredIdentifiers_respostaValida_1() {
         return identifiers_respostaValida_1;
    }

    /**
     * Returns the name of the class of one declared object for
     * rule respostaValida_1.
     *
     * @param index the index of the declaration
     * @return the name of the class of the declared objects for
     *          this rule.
     */
    private String getDeclaredClassName_respostaValida_1(int index) {
        switch (index) {
            case 0: return "agentes.DiagramaSequencia";
            case 1: return "agentes.DiagramaSequenciaRespostas";
            default: return null;
        }
    }

    /**
     * Returns the class of one declared object for rule respostaValida_1.
     *
     * @param index the index of the declaration
     * @return the class of the declared objects for this rule.
     */
    private Class getDeclaredClass_respostaValida_1(int index) {
        switch (index) {
            case 0: return agentes.DiagramaSequencia.class;
            case 1: return agentes.DiagramaSequenciaRespostas.class;
            default: return null;
        }
    }

    /**
     * Sets an object declared in the rule respostaValida_1.
     *
     * @param index the index of the declared object
     * @param value the value of the object being set.
     */
    private void setObject_respostaValida_1(int index, Object value) {
        switch (index) {
            case 0: this.agentes_DiagramaSequencia_1 = (agentes.DiagramaSequencia) value; break;
            case 1: this.agentes_DiagramaSequenciaRespostas_1 = (agentes.DiagramaSequenciaRespostas) value; break;
        }
    }

    /**
     * Returns an object declared in the rule respostaValida_1.
     *
     * @param index the index of the declared object
     * @return the value of the corresponding object.
     */
    private Object getObject_respostaValida_1(int index) {
        switch (index) {
            case 0: return agentes_DiagramaSequencia_1;
            case 1: return agentes_DiagramaSequenciaRespostas_1;
            default: return null;
        }
    }

    /**
     * Returns all variables bound to the declarations 
     * of rule respostaValida_1
     *
     * @return an object array of the variables bound to the
     *          declarations of this rule.
     */
    private Object[] getObjects_respostaValida_1() {
        return new Object[] {
                            agentes_DiagramaSequencia_1,
                            agentes_DiagramaSequenciaRespostas_1
                            };
    }

    /**
     * Defines all variables bound to the declarations 
     * of rule respostaValida_1
     *
     * @param objects an object array of the variables bound to the
     *          declarations of this rule.
     */
    private void setObjects_respostaValida_1(Object[] objects) {
        agentes_DiagramaSequencia_1 = (agentes.DiagramaSequencia) objects[0];
        agentes_DiagramaSequenciaRespostas_1 = (agentes.DiagramaSequenciaRespostas) objects[1];
    }

    /**
     * Condition 0 of rule respostaValida_1.<p>
     * The original expression was:<br>
     * <code>parte1.verificarPreenchimento()</code>
     *
     * @return <code>true</code> if the condition is satisfied;
     *          <code>false</code> otherwise.
     */
    private boolean respostaValida_1_cond_0() {
        return (agentes_DiagramaSequencia_1.verificarPreenchimento());
    }

    /**
     * Condition 1 of rule respostaValida_1.<p>
     * The original expression was:<br>
     * <code>respostas.elementoRepetido(parte1.getOpcao1(), parte1.getOpcao2()) == -1</code>
     *
     * @return <code>true</code> if the condition is satisfied;
     *          <code>false</code> otherwise.
     */
    private boolean respostaValida_1_cond_1() {
        return (agentes_DiagramaSequenciaRespostas_1.elementoRepetido(agentes_DiagramaSequencia_1.getOpcao1(), agentes_DiagramaSequencia_1.getOpcao2()) == -1);
    }

    /**
     * Checks whether some conditions of rule respostaValida_1 is satisfied.
     *
     * @param index the index of the condition to be checked.
     * @return <code>true</code> if the condition is satisfied;
     *          <code>false</code> otherwise.
     */
    private boolean respostaValida_1_cond(int index) {
        switch (index) {
            case 0: return respostaValida_1_cond_0();
            case 1: return respostaValida_1_cond_1();
            default: return false;
        }
    }

    /**
     * Checks whether all conditions of rule respostaValida_1 that depend only on
     * the given object are satisfied.
     *
     * @param declIndex the index of the declaration to be checked
     * @return <code>true</code> if all corresponding conditions for
     *          this rule are satisfied; <code>false</code> otherwise.
     */
    private boolean checkConditionsOnlyOf_respostaValida_1(int declIndex) {
        switch (declIndex) {
            case 0:
                if (!respostaValida_1_cond_0()) return false;
                return true;
            case 1:
                return true;
            default: return false;
        }
    }

    /**
     * Checks whether all the conditions of a rule which
     * reference some declared element of the declarations are
     * true.
     *
     * @param declIndex the index of the declared element.
     * @return <code>true</code> if the conditions that reference
     *          up to the given declaration are true;
     *          <code>false</code> otherwise.
     */
    private boolean checkCondForDeclaration_respostaValida_1(int declIndex) {
        switch (declIndex) {
            case 0:
                return true;
            case 1:
                if (!respostaValida_1_cond_1()) return false;
                return true;
            default: return false;
        }
    }

    /**
     * Executes the action part of the rule respostaValida_1
     */
    private void respostaValida_1() {
			agentes_DiagramaSequenciaRespostas_1.setRespostas(agentes_DiagramaSequencia_1.getOpcao1(), agentes_DiagramaSequencia_1.getOpcao2());
			agentes_DiagramaSequencia_1.preencherRespostas();
			agentes_DiagramaSequencia_1.mostrarIconeSucesso();
			modified(agentes_DiagramaSequenciaRespostas_1);
			retract(agentes_DiagramaSequencia_1);
	
	    }


	
	
    /**
     * Identifiers of rule respostaInvalida
     */
    private String[] identifiers_respostaInvalida = {
        "parte1",
        "respostas",
        "dicas"
    };

    /**
     * Returns the identifiers declared in rule respostaInvalida
     *
     * @return the identifiers declared in rule respostaInvalida
     */
    private String[] getDeclaredIdentifiers_respostaInvalida() {
         return identifiers_respostaInvalida;
    }

    /**
     * Returns the name of the class of one declared object for
     * rule respostaInvalida.
     *
     * @param index the index of the declaration
     * @return the name of the class of the declared objects for
     *          this rule.
     */
    private String getDeclaredClassName_respostaInvalida(int index) {
        switch (index) {
            case 0: return "agentes.DiagramaSequencia";
            case 1: return "agentes.DiagramaSequenciaRespostas";
            case 2: return "agentes.DiagramaSequenciaDicas";
            default: return null;
        }
    }

    /**
     * Returns the class of one declared object for rule respostaInvalida.
     *
     * @param index the index of the declaration
     * @return the class of the declared objects for this rule.
     */
    private Class getDeclaredClass_respostaInvalida(int index) {
        switch (index) {
            case 0: return agentes.DiagramaSequencia.class;
            case 1: return agentes.DiagramaSequenciaRespostas.class;
            case 2: return agentes.DiagramaSequenciaDicas.class;
            default: return null;
        }
    }

    /**
     * Sets an object declared in the rule respostaInvalida.
     *
     * @param index the index of the declared object
     * @param value the value of the object being set.
     */
    private void setObject_respostaInvalida(int index, Object value) {
        switch (index) {
            case 0: this.agentes_DiagramaSequencia_1 = (agentes.DiagramaSequencia) value; break;
            case 1: this.agentes_DiagramaSequenciaRespostas_1 = (agentes.DiagramaSequenciaRespostas) value; break;
            case 2: this.agentes_DiagramaSequenciaDicas_1 = (agentes.DiagramaSequenciaDicas) value; break;
        }
    }

    /**
     * Returns an object declared in the rule respostaInvalida.
     *
     * @param index the index of the declared object
     * @return the value of the corresponding object.
     */
    private Object getObject_respostaInvalida(int index) {
        switch (index) {
            case 0: return agentes_DiagramaSequencia_1;
            case 1: return agentes_DiagramaSequenciaRespostas_1;
            case 2: return agentes_DiagramaSequenciaDicas_1;
            default: return null;
        }
    }

    /**
     * Returns all variables bound to the declarations 
     * of rule respostaInvalida
     *
     * @return an object array of the variables bound to the
     *          declarations of this rule.
     */
    private Object[] getObjects_respostaInvalida() {
        return new Object[] {
                            agentes_DiagramaSequencia_1,
                            agentes_DiagramaSequenciaRespostas_1,
                            agentes_DiagramaSequenciaDicas_1
                            };
    }

    /**
     * Defines all variables bound to the declarations 
     * of rule respostaInvalida
     *
     * @param objects an object array of the variables bound to the
     *          declarations of this rule.
     */
    private void setObjects_respostaInvalida(Object[] objects) {
        agentes_DiagramaSequencia_1 = (agentes.DiagramaSequencia) objects[0];
        agentes_DiagramaSequenciaRespostas_1 = (agentes.DiagramaSequenciaRespostas) objects[1];
        agentes_DiagramaSequenciaDicas_1 = (agentes.DiagramaSequenciaDicas) objects[2];
    }

    /**
     * Condition 0 of rule respostaInvalida.<p>
     * The original expression was:<br>
     * <code>parte1.verificarPreenchimento()</code>
     *
     * @return <code>true</code> if the condition is satisfied;
     *          <code>false</code> otherwise.
     */
    private boolean respostaInvalida_cond_0() {
        return (agentes_DiagramaSequencia_1.verificarPreenchimento());
    }

    /**
     * Condition 1 of rule respostaInvalida.<p>
     * The original expression was:<br>
     * <code>respostas.elementoRepetido(parte1.getOpcao1(), parte1.getOpcao2()) >= 0</code>
     *
     * @return <code>true</code> if the condition is satisfied;
     *          <code>false</code> otherwise.
     */
    private boolean respostaInvalida_cond_1() {
        return (agentes_DiagramaSequenciaRespostas_1.elementoRepetido(agentes_DiagramaSequencia_1.getOpcao1(), agentes_DiagramaSequencia_1.getOpcao2()) >= 0);
    }

    /**
     * Checks whether some conditions of rule respostaInvalida is satisfied.
     *
     * @param index the index of the condition to be checked.
     * @return <code>true</code> if the condition is satisfied;
     *          <code>false</code> otherwise.
     */
    private boolean respostaInvalida_cond(int index) {
        switch (index) {
            case 0: return respostaInvalida_cond_0();
            case 1: return respostaInvalida_cond_1();
            default: return false;
        }
    }

    /**
     * Checks whether all conditions of rule respostaInvalida that depend only on
     * the given object are satisfied.
     *
     * @param declIndex the index of the declaration to be checked
     * @return <code>true</code> if all corresponding conditions for
     *          this rule are satisfied; <code>false</code> otherwise.
     */
    private boolean checkConditionsOnlyOf_respostaInvalida(int declIndex) {
        switch (declIndex) {
            case 0:
                if (!respostaInvalida_cond_0()) return false;
                return true;
            case 1:
                return true;
            case 2:
                return true;
            default: return false;
        }
    }

    /**
     * Checks whether all the conditions of a rule which
     * reference some declared element of the declarations are
     * true.
     *
     * @param declIndex the index of the declared element.
     * @return <code>true</code> if the conditions that reference
     *          up to the given declaration are true;
     *          <code>false</code> otherwise.
     */
    private boolean checkCondForDeclaration_respostaInvalida(int declIndex) {
        switch (declIndex) {
            case 0:
                return true;
            case 1:
                if (!respostaInvalida_cond_1()) return false;
                return true;
            case 2:
                return true;
            default: return false;
        }
    }

    /**
     * Executes the action part of the rule respostaInvalida
     */
    private void respostaInvalida() {
			agentes_DiagramaSequencia_1.preencherRespostas();
			agentes_DiagramaSequencia_1.mostrarIconeFalha();
			agentes_DiagramaSequenciaDicas_1.setHaErro(true);
			modified(agentes_DiagramaSequenciaDicas_1);
			retract(agentes_DiagramaSequencia_1);
	
	    }

	
	

    /**
     * The names of the rules in this class file
     */
    private static final String[] File_ruleNames = {
        "respostaValida",
        "respostaValida_1",
        "respostaInvalida"
    };

    /**
     * Returns the name of the rules in this class file.
     *
     * @return the name of the rules in this class file.
     */
    public String[] getRuleNames() {
        return File_ruleNames;
    }

    /**
     * The number of declarations of the rules in this class file.
     */
    private static final int[] File_numberOfDeclarations = {
        3,
        2,
        3
    };

    /**
     * Returns the number of declarations of the rules in this class file.
     *
     * @return the number of declarations  of the rules in this class file.
     */
    public int[] getNumberOfDeclarations() {
        return File_numberOfDeclarations;
    }

    /**
     * The number of conditions of the rules in this class file.
     */
    private static final int[] File_numberOfConditions = {
        3,
        2,
        2
    };

    /**
     * Returns the number of conditions of the rules in this class file.
     *
     * @return the number of conditions  of the rules in this class file.
     */
    public int[] getNumberOfConditions() {
        return File_numberOfConditions;
    }

    /**
     * Checks whether a condition of some rule is satisfied.
     *
     * @param ruleIndex the index of the rule to be checked
     * @param condIndex the index of the condition to be checked
     * @return <code>true</code> if the corresponding condition for the
     *          given rule is satisfied. <code>false</code> otherwise.
     */
    public boolean checkCondition(int ruleIndex, int condIndex) {
        switch (ruleIndex) {
            case 0: return respostaValida_cond(condIndex);
            case 1: return respostaValida_1_cond(condIndex);
            case 2: return respostaInvalida_cond(condIndex);
            default: return false;
        }
    }

    /**
     * Checks whether all conditions of some rule that depend only on
     * the given object are satisfied.
     *
     * @param ruleIndex the index of the rule to be checked
     * @param declIndex the index of the declaration to be checked
     * @return <code>true</code> if all corresponding conditions for
     *          the given rule are satisfied;
     *           <code>false</code> otherwise.
     */
    public boolean checkConditionsOnlyOf(int ruleIndex, int declIndex) {
        switch (ruleIndex) {
            case 0: return checkConditionsOnlyOf_respostaValida(declIndex);
            case 1: return checkConditionsOnlyOf_respostaValida_1(declIndex);
            case 2: return checkConditionsOnlyOf_respostaInvalida(declIndex);
            default: return false;
        }
    }

    /**
     * Checks whether all the conditions of a rule which
     * reference only the elements declared up to the given index
     * are true.
     *
     * @param ruleIndex the index of the rule to be checked
     * @param declIndex the index of the declaration to be checked
     * @return <code>true</code> if all the conditions of a rule which
     *          reference only the elements declared up to the given index
     *          are satisfied; <code>false</code> otherwise.
     */
    public boolean checkCondForDeclaration(int ruleIndex, int declIndex) {
        switch (ruleIndex) {
            case 0: return checkCondForDeclaration_respostaValida(declIndex);
            case 1: return checkCondForDeclaration_respostaValida_1(declIndex);
            case 2: return checkCondForDeclaration_respostaInvalida(declIndex);
            default: return false;
        }
    }

    /**
     * Returns the class name of an object declared in a rule.
     *
     * @param ruleIndex the index of the rule
     * @param declIndex the index of the declaration
     * @return the class name of the declared object.
     */
    public String getDeclaredClassName(int ruleIndex, int declIndex) {
        switch (ruleIndex) {
            case 0: return getDeclaredClassName_respostaValida(declIndex);
            case 1: return getDeclaredClassName_respostaValida_1(declIndex);
            case 2: return getDeclaredClassName_respostaInvalida(declIndex);
            default: return null;
        }
    }

    /**
     * Returns the class of an object declared in a rule.
     *
     * @param ruleIndex the index of the rule
     * @param declIndex the index of the declaration
     * @return the class of the declared object.
     */
    public Class getDeclaredClass(int ruleIndex, int declIndex) {
        switch (ruleIndex) {
            case 0: return getDeclaredClass_respostaValida(declIndex);
            case 1: return getDeclaredClass_respostaValida_1(declIndex);
            case 2: return getDeclaredClass_respostaInvalida(declIndex);
            default: return null;
        }
    }

    /**
     * Fires one of the rules in this rule base.
     *
     * @param ruleIndex the index of the rule to be fired
     */
    protected void internalFireRule(int ruleIndex) {
        switch (ruleIndex) {
            case 0: respostaValida(); break;
            case 1: respostaValida_1(); break;
            case 2: respostaInvalida(); break;
        }
    }

    /**
     * Returns the number of rules.
     *
     * @return the number of rules.
     */
    public int getNumberOfRules() {
        return 3;
    }

    /**
     * Returns the identifiers declared in a given rule.
     *
     * @param ruleIndex the index of the rule.
     * @return an array with the identifiers of the rule declarations.
     */
    public String[] getDeclaredIdentifiers(int ruleIndex) {
        switch (ruleIndex) {
            case 0: return getDeclaredIdentifiers_respostaValida();
            case 1: return getDeclaredIdentifiers_respostaValida_1();
            case 2: return getDeclaredIdentifiers_respostaInvalida();
            default: return new String[0];
        }
    }

    /**
     * Sets an object that represents a declaration of some rule.
     *
     * @param ruleIndex the index of the rule
     * @param declIndex the index of the declaration in the rule.
     * @param value the value of the object being set.
     */
    public void setObject(int ruleIndex, int declIndex, Object value) {
        switch (ruleIndex) {
            case 0: setObject_respostaValida(declIndex, value); break;
            case 1: setObject_respostaValida_1(declIndex, value); break;
            case 2: setObject_respostaInvalida(declIndex, value); break;
        }
    }

    /**
     * Returns an object that represents a declaration of some rule.
     *
     * @param ruleIndex the index of the rule
     * @param declIndex the index of the declaration in the rule.
     * @return the value of the corresponding object.
     */
    public Object getObject(int ruleIndex, int declIndex) {
        switch (ruleIndex) {
            case 0: return getObject_respostaValida(declIndex);
            case 1: return getObject_respostaValida_1(declIndex);
            case 2: return getObject_respostaInvalida(declIndex);
            default: return null;
        }
    }

    /**
     * Returns all variables bound to the declarations of
     * some rule.
     *
     * @param ruleIndex the index of the rule
     * @return an object array of the variables bound to the
     *          declarations of some rule.
     */
    public Object[] getObjects(int ruleIndex) {
        switch (ruleIndex) {
            case 0: return getObjects_respostaValida();
            case 1: return getObjects_respostaValida_1();
            case 2: return getObjects_respostaInvalida();
            default: return null;
        }
    }
    /**
     * Defines all variables bound to the declarations of
     * some rule.
     *
     * @param ruleIndex the index of the rule
     * @param objects an object array of the variables bound to the
     *          declarations of some rule.
     */
    public void setObjects(int ruleIndex, Object[] objects) {
        switch (ruleIndex) {
            case 0: setObjects_respostaValida(objects); break;
            case 1: setObjects_respostaValida_1(objects); break;
            case 2: setObjects_respostaInvalida(objects); break;
        }
    }

    /*
     * The variables declared in the rules.
     */
    private agentes.DiagramaSequencia agentes_DiagramaSequencia_1;
    private agentes.DiagramaSequenciaRespostas agentes_DiagramaSequenciaRespostas_1;
    private agentes.DiagramaSequenciaDicas agentes_DiagramaSequenciaDicas_1;

    /**
     * Class constructor.
     *
     * @param knowledgeBase the knowledge base that contains this rule base.
     */
    public Jeops_RuleBase_DiagramaSequenciaRegras(jeops.AbstractKnowledgeBase knowledgeBase) {
        super(knowledgeBase);
    }

}
/**
 * Knowledge base created by JEOPS from file DiagramaSequenciaRegras.rules
 *
 * @version Dec 11, 2013
 */
public class DiagramaSequenciaRegras extends jeops.AbstractKnowledgeBase {

    /**
     * Creates a new knowledge base with the specified conflict set with the
     * desired conflict resolution policy.
     *
     * @param conflictSet a conflict set with the desired resolution policy
     */
    public DiagramaSequenciaRegras(jeops.conflict.ConflictSet conflictSet) {
        super(conflictSet);
    }

    /**
     * Creates a new knowledge base, using the default conflict resolution
     * policy.
     */
    public DiagramaSequenciaRegras() {
        this(new jeops.conflict.DefaultConflictSet());
    }

    /**
     * Factory method used to instantiate the rule base.
     */
    protected jeops.AbstractRuleBase createRuleBase() {
        return new Jeops_RuleBase_DiagramaSequenciaRegras(this);
    }

}
